﻿using System;
using System.IO;

namespace Noria.CssTool
{
    class ParameterManager
    {
        public static CssParameter Create(string[] args)
        {
            if (args.Length == 1 && args[0] == "*")
            {
                var param = new CssParameter();
                param.Files = Directory.GetFiles("./", "*.css");
                return param;
            }
            else if (args.Length > 0)
            {
                var param = new CssParameter();
                param.Files = args;
                return param;
            }
            else 
            {
                throw new ArgumentException("Input css file(s) cannot be empty.");
            }
        }
    }
}